const { createProxyMiddleware } = require('http-proxy-middleware')


module.exports = function (app) {
    app.use(createProxyMiddleware('/api', {
        target: 'http://t.weather.sojson.com',
        secure: false,
        changeOrigin: true,
        // pathRewrite: {
        //     "/api": ""
        // }
    }))

    app.use(createProxyMiddleware('/v3', {
        target: 'http://api.map.baidu.com/telematics',
        secure: false,
        changeOrigin: true,
        // pathRewrite: {
        //     "/api": ""
        // }
    }))
}